<template>
    <van-tabbar v-model="active" >
        <van-tabbar-item icon="wap-home" to="/">世界</van-tabbar-item>
        <van-tabbar-item icon="idcard"   to="/team">团队</van-tabbar-item>
        <van-tabbar-item icon="contact"  to="/mine">我的</van-tabbar-item>
    </van-tabbar>


  <!--   <van-tabbar v-model="active">
  <van-tabbar-item icon="home-o"  @click="pathteam" >世界</van-tabbar-item>
  <van-tabbar-item icon="search" dot  @click="pathworld" >团队</van-tabbar-item>
  <van-tabbar-item icon="freinds-o" info="5"  @click="pathmine">我的</van-tabbar-item>

</van-tabbar> -->


</template>
<script>
export default {
    name: 'AppFooter',
  data() {
    return {
      active: 0
    }
  },
  methods: {
     pathworld: function () {
         var _this = this;
         _this.active=0;
         console.log(this.active)
         _this.$router.push({path: '/'})
         
     },
     pathteam: function () {
         var _this = this;
         _this.active=1;
           console.log(this.active)
         _this.$router.push({path: '/team'})

     },
     pathmine: function () {
         var _this = this;
         _this.active=2;
           console.log(this.active)
         _this.$router.push({path: '/mine'})
     } 
  },

    mounted(){
          
            console.log(this.$route.path)
            var route =this.$route.path;
            if(route=='/'){
               this.active = 0
            }
            else if(route == '/team'){
                this.active= 1
            }else if(route == '/mine'){
                this.active=2
            }
}



}
</script>
<style lang="">
    .van-tabbar-item--active{color:#259E7B}
</style>